package concurrent;

/**
 * description: HasSelfPrivateNum <br>
 * date: 2020/3/4 0:05 <br>
 * author: llkj <br>
 * version: 1.0 <br>
 */
public class HasSelfPrivateNum {

    private int num = 0;

    public  void addI(String username){
        try {
            if (username.equals("a")) {
                num = 100;
                System.out.println("a set over");
                Thread.sleep(2000);
            }else{
                num = 200;
                System.out.println("b set over");
            }
            System.out.println(username +" num=" + num);
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
